import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/main',
    component: () =>import(/* webpackChunkName: "main" */ '../views/main/index.vue'),
    children:[
        {
            path:'/main/teacher',
            component: () =>import(/* webpackChunkName: "main" */ '../views/main/teacherIndex.vue'),
        },
        {
            path:'/main/score',
            component: () =>import(/* webpackChunkName: "main" */ '../views/main/scoreManger.vue'),
        },
        {
            path:'/main/studentIndex',
            component: () =>import(/* webpackChunkName: "main" */ '../views/main/studentIndex.vue'),
        },
        {
            path:'/main/person',
            component: () =>import(/* webpackChunkName: "main" */ '../views/main/person.vue'),
        },
        {
            path:'/main/student',
            component: () =>import(/* webpackChunkName: "main" */ '../views/main/studentManger.vue'),
        }
    ]
  },
  {
    path: '/login',
    component: () => import(/* webpackChunkName: "login" */ '../views/login.vue')
  },
  {
    path: '/registry',
    component: () => import(/* webpackChunkName: "registry" */ '../views/registry.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
